<template>
  <div class="wrapper">
    <h3>Father</h3>
    <p>学校：{{name}}</p>
    <hr>
    <Son :getName="getName"/>
  </div>
</template>

<script>
import Son from './Son.vue'
export default {
  components: { Son },
  name: 'Father',
  data(){
    return {
        name:''
    }
  },
  methods:{
    getName(school){
        console.log('Father school: ', school)
        this.name = school
    }
  }
}
</script>

<style>
.wrapper {
  width: 500px;
  height: 300px;
  background-color: aquamarine;
}
</style>